/* Copyright ©, 2022, ECARX (Hubei) Technology Co., Ltd. All rights reserved.
 *
 * NOTICE: This file contains information which is confidential and proprietary to ECARX
 * (Hubei) Technology Co., Ltd. and/or other developers. No license to any intellectual
 * property rights contained within this file is either granted or implied except as may be
 * provided in an agreement with ECARX (Hubei) Technology Co., Ltd.
 *
 * Any unauthorized copying or distribution of content from this file in whole or in part
 * is prohibited.
 */
#ifndef ECARX_VHAL_CORE_VIRTUAL_PROPERTY_BUILD_H
#define ECARX_VHAL_CORE_VIRTUAL_PROPERTY_BUILD_H

#include <functional>
#include <type_traits>
#include <vector>

#include "cstdint"
#include "vhal_core/property/TimerBuilder.h"
#include "vhal_core/utils/convert.h"

namespace ecarx::vhal::core::property {

/**
 * @brief virtual property
 * 
 * @tparam _TY 
 */
template <typename _TY>
class VirtualPropertyBuilder {
    IProperty* mProperty;

  public:
    VirtualPropertyBuilder(IProperty* property) : mProperty(property) {}

    /**
     * @brief define a virtual task
     * 
     * @param taskId 
     * @return TimerBuilder<_TY, VirtualPropertyBuilder<_TY>> 
     */
    TimerBuilder<_TY, VirtualPropertyBuilder<_TY>> toTask(int32_t taskId = 0) {
        return TimerBuilder<_TY, VirtualPropertyBuilder<_TY>>(
            new Area(mProperty, taskId, VehiclePropertyStatus::AVAILABLE));
    }
};

}  // namespace ecarx::vhal::core::property

#endif